package unimelb.filesync.common.message;

import org.json.simple.JSONObject;

public class ResponsePublicKey implements Jsonable {
    
    private final String publicKey;

    public ResponsePublicKey(String publicKey) {
        super();
        this.publicKey = publicKey;
    }

    public String getPublicKey() {
        return publicKey;
    }

    @SuppressWarnings("unchecked")
    @Override
    public String toJson() {
        final JSONObject jsonObject = new JSONObject();
        jsonObject.put("publicKey", publicKey);
        return jsonObject.toJSONString();
    }

}
